<template>
  <div class="login">
    <nav-top title="登录" :goback="true"></nav-top>
    <div class="logo">
      <img src="/static/img/register-logo.png" />
    </div>
    <div class="form">
      <van-field class="input" v-model="phone" clearable type="tel" placeholder="请输入手机号">
        <img class="icon-img" src="/static/icon/phone.png" slot="left-icon" />
      </van-field>
      <van-field
        class="input"
        v-model="passwd"
        clearable
        :type="passwdShow?'text':'password'"
        placeholder="请输入密码"
      >
        <img class="icon-img" src="/static/icon/passwd.png" slot="left-icon" />
        <img
          class="passwd-icon"
          :src="passwdShow?'/static/icon/passwd-show.png':'/static/icon/passwd-hidden.png'"
          slot="right-icon"
          @click="showPw"
        />
      </van-field>
      <van-button class="submit" type="primary" size="large">登录</van-button>
      <div class="other-action">
        <a class="lose-passwd" href="www.aaa">忘记密码？</a>
        <a class="register-now" href="www.aaa">立即注册</a>
      </div>
      <div class="text-line">
        <span>第三方登录</span>
      </div>
      <div class="wx-login">
        <img src="/static/icon/wx-login.png" alt />
        <br />
        <span>微信</span>
      </div>
      <div class="about">
        <a href="#">关于我们</a>
        <span>|</span>
        <a href="#">隐私协议</a>
        <span>|</span>
        <a href="#">意见反馈</a>
      </div>
      <div class="contact">
        <span>客服电话：400-000-2833 客服微信：likehealth</span>
      </div>
    </div>
  </div>
</template>

<script>
import NavTop from "@/components/nav/navBar";

export default {
  components: {
    NavTop
  },
  name: "Login",
  data() {
    return {
      passwdShow: false,
      phone: "",
      passwd: ""
    };
  },
  methods: {
    showPw() {
      this.passwdShow = !this.passwdShow;
    }
  }
};
</script>
<style lang='scss' scoped>
.login {
  height: 690px;
  .logo {
    text-align: center;
    position: relative;
    top: 78px;
    height: 0;
    img {
      width: 87px;
      height: 31px;
    }
  }
  .form {
    position: relative;
    top: 129px;
    padding-left: 21px;
    padding-right: 21px;
    .icon-img {
      width: 17px;
    }
    .passwd-icon {
      right: -4px;
      position: relative;
      width: 25px;
      height: 15px;
      top: 4px;
    }
    .input {
      position: relative;
      margin-top: 15px;
      padding: 0px;
      padding-bottom: 11px;
      border-bottom: 1px solid #ececec;
      font-size: 13px;
      line-height: 20px;
      font-family: Microsoft YaHei;
      font-weight: 400;
      ::-webkit-input-placeholder {
        color: rgba(214, 214, 214, 1);
      }
      .send-code {
        height: 16px;
        line-height: 1px;
        font-size: 12px;
        background: #fff;
        color: #4d39c6;
        border: none;
      }
    }
    .submit {
      margin-top: 39px;
      position: relative;
      height: 44px;
      font-size: 15px;
      font-family: Microsoft YaHei;
      font-weight: 400;
      color: rgba(255, 255, 255, 1);
      line-height: 1px;
      background-color: #06a44f;
      border-color: #06a44f;
      border-radius: 2px;
    }
    .other-action {
      padding-top: 15px;
      height: 48px;
      a {
        font-size: 12px;
        font-family: Microsoft YaHei;
        font-weight: 400;
        line-height: 12px;
      }
      .lose-passwd {
        float: left;
        color: rgba(102, 102, 102, 1);
      }
      .register-now {
        float: right;
        color: rgba(6, 164, 79, 1);
      }
    }
    .text-line {
      text-align: center;
      border-bottom: 1px solid #ececec;
      margin-bottom: 8px;
      span {
        position: relative;
        top: 8px;
        font-size: 10px;
        font-family: Microsoft YaHei;
        font-weight: 400;
        line-height: 10px;
        padding: 0 5px;
        color: rgba(102, 102, 102, 1);
        background-color: #fff;
      }
    }
    .wx-login {
      margin: 0 auto;
      text-align: center;
      width: 39px;
      padding-top: 13px;
      line-height: 1px;
      img {
        width: 39px;
        height: 39px;
      }
      span {
        font-size: 10px;
        font-family: Microsoft YaHei;
        font-weight: 400;
        line-height: 20px;
        color: rgba(102, 102, 102, 1);
      }
    }
    .about {
      padding-top: 80px;
      text-align: center;
      a {
        font-size: 9px;
        line-height: 1px;
        font-family: Microsoft YaHei;
        color: rgba(157, 157, 157, 1);
        padding: 0;
      }
      span {
        position: relative;
        font-size: 12px;
        color: #ececec;
        line-height: 1px;
        padding: 0 5px;
      }
    }
    .contact {
      text-align: center;
      padding-top: 10px;
      span {
        font-size: 9px;
        line-height: 1px;
        font-family: Microsoft YaHei;
        color: rgba(157, 157, 157, 1);
        padding: 0;
      }
    }
  }
}
</style>
